package homework;

import java.util.Scanner;

public class CountNumE {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入字符串");
        String string=input.next();
        int longstring=string.length();
        int count=0;
        for(int i=0;i<longstring;i++)
        {
            if(string.charAt(i)=='e')
            {
                count++;
            }
        }

        System.out.println("字符 “e” 在字符串中出现了"+count+"次");
    }
}
